home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- AutoRedraw = -1 'True
- BackColor = &H8000000C&
- Caption = "Server"
- ClientHeight = 4710
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5310
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 4710
- ScaleWidth = 5310
- WindowState = 2 'Maximized
- Begin VB.TextBox Text4
- Height = 285
- Left = 0
- TabIndex = 9
- Top = 4320
- Width = 2415
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 3435
- Index = 0
- Left = 0
- ScaleHeight = 3405
- ScaleWidth = 4935
- TabIndex = 0
- Top = 0
- Visible = 0 'False
- Width = 4965
- Begin VB.CommandButton Command3
- Caption = "Conn."
- Height = 255
- Index = 0
- Left = 4320
- TabIndex = 8
- Top = 3120
- Width = 615
- End
- Begin VB.PictureBox Picture2
- BackColor = &H80000002&
- BorderStyle = 0 'None
- Height = 255
- Index = 0
- Left = 0
- ScaleHeight = 255
- ScaleWidth = 4935
- TabIndex = 3
- Top = 0
- Width = 4935
- Begin VB.CommandButton Command1
- Caption = "X"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 0
- Left = 4680
- TabIndex = 5
- Top = 0
- Width = 255
- End
- Begin VB.CommandButton Command2
- Caption = "_"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 0
- Left = 4440
- TabIndex = 6
- Top = 0
- Width = 255
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Username"
- BeginProperty Font
- Name = "System"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = -1 'True
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000009&
- Height = 240
- Index = 0
- Left = 120
- TabIndex = 4
- Top = 0
- Width = 1005
- End
- End
- Begin VB.TextBox Text2
- Height = 285
- Index = 0
- Left = 0
- TabIndex = 2
- Top = 3120
- Width = 4335
- End
- Begin VB.TextBox Text1
- Height = 2895
- Index = 0
- Left = 0
- Locked = -1 'True
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Top = 240
- Width = 4935
- End
- End
- Begin VB.TextBox Text3
- Height = 4095
- Left = 0
- Locked = -1 'True
- MultiLine = -1 'True
- TabIndex = 7
- Top = 0
- Width = 5055
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim MouseStartX, MouseStarty
- Sub loadfrm(maxd)
- On Error Resume Next
- Load Picture1(maxd)
- Picture1(maxd).Visible = True
- Picture1(maxd).Left = Picture1(maxd - 1).Left + 500
- Picture1(maxd).Top = Picture1(maxd - 1).Top + 500
- Picture1(maxd).ZOrder 0
- Load Picture2(maxd)
- Set Picture2(maxd).Container = Picture1(maxd)
- Picture2(maxd).Visible = True
- Load Label1(maxd)
- Set Label1(maxd).Container = Picture2(maxd)
- Label1(maxd).Visible = True
- Load Text1(maxd)
- Set Text1(maxd).Container = Picture1(maxd)
- Text1(maxd).Visible = True
- Text1(maxd).Text = ""
- Load Text2(maxd)
- Set Text2(maxd).Container = Picture1(maxd)
- Text2(maxd).Visible = True
- Text2(maxd).Text = ""
- Load Command1(maxd)
- Set Command1(maxd).Container = Picture1(maxd)
- Command1(maxd).Visible = True
- Load Command2(maxd)
- Set Command2(maxd).Container = Picture1(maxd)
- Command2(maxd).Visible = True
- Command1(maxd).ZOrder 0
- Load Command3(maxd)
- Set Command3(maxd).Container = Picture1(maxd)
- Command3(maxd).Visible = True
- Command3(maxd).ZOrder 0
- End Sub
- Private Sub Command1_Click(Index As Integer)
- On Error Resume Next
- Picture1(Index).ZOrder 0
- MDIForm1.sck.SendData "kick=>:" & Label1(Index).Caption & "=>:" & user.Nickname
- Picture1(Index).Visible = False
- MDIForm1.Command1(Index).Visible = False
- End Sub
- Private Sub Command2_Click(Index As Integer)
- On Error Resume Next
- Picture1(Index).ZOrder 0
- Picture1(Index).Visible = False
- End Sub
- Private Sub Command3_Click(Index As Integer)
- On Error Resume Next
- Dim res As VbMsgBoxResult
- res = MsgBox("Do you want to chat to " & Label1(Index).Caption & "?", vbYesNo)
- If res = vbYes Then
- MDIForm1.sck.SendData "ping=>:" & Label1(Index).Caption & "=>:" & user.Nickname
- Command3(Index).Visible = False
- Text2(Index).Width = Picture1(Index).Width
- End If
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- Text3.Width = Me.ScaleWidth
- Text3.Height = Me.ScaleHeight - Text4.Height
- Text4.Top = Me.ScaleHeight - Text4.Height
- Text4.Width = Me.ScaleWidth
- End Sub
- Private Sub Label1_Click(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Picture1_GotFocus(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Picture2_Click(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Picture2_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- MouseStartX = X
- MouseStarty = Y
- End Sub
- Private Sub Picture2_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Button = vbLeftButton Then
- Picture1(Index).Left = Picture1(Index).Left - (MouseStartX - X)
- Picture1(Index).Top = Picture1(Index).Top - (MouseStarty - Y)
- End If
- End Sub
- Private Sub Text1_Change(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Text1_GotFocus(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Text2_Change(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Text2_GotFocus(Index As Integer)
- Picture1(Index).ZOrder 0
- End Sub
- Private Sub Text2_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
- On Error Resume Next
- If KeyCode = vbKeyReturn Then
- MDIForm1.sck.SendData "mess=>:" & Label1(Index).Caption & "=>:" & user.Nickname & "=>:" & Text2(Index).Text
- Text1(Index).SelStart = Len(Text1(Index).Text)
- Text1(Index).SelText = vbCrLf
- Text1(Index).SelText = "<<" & user.Nickname & ">> " & Text2(Index).Text & vbCrLf
- Text2(Index).Text = ""
- End If
- End Sub
- Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
- On Error Resume Next
- If KeyCode = vbKeyReturn Then
- MDIForm1.sck.SendData "serv=>:" & user.Nickname & "=>:" & Text4.Text
- Text4.Text = ""
- End If
- End Sub
-